#include <stdio.h>
union union_t
{
	char tid;
	int sid;
};
struct t_s
{
	int type;
	char *name;
	union union_t id;
};
typedef struct t_s t;
void print_t(t *temp)
{
	if(temp->type == 0)
	{
		printf("student name:%s,student number:%d\n",temp->name,temp->id);
	}
	else
	{
		printf("teacher name:%s,class :%c\n",temp->name,temp->id);
	}
}
int main(void)
{
	t s1 = {0,"jin",1},t1 = {1,"jin",'A'};
	print_t(&s1);
	print_t(&t1);
	return 0;
}
